package com.jsu.clubmanagementsystem.model.enums;

public enum ReviewResultEnum {
    WAITING(0, "待审核"),
    ACCEPT(1, "通过"),
    REJECT(2, "拒绝");

    private final int code;
    private final String info;

    ReviewResultEnum(int code, String desc) {
        this.code = code;
        this.info = desc;
    }

    public int getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static ReviewResultEnum getByCode(int code) {
        for (ReviewResultEnum result : ReviewResultEnum.values()) {
            if (result.getCode() == code) {
                return result;
            }
        }
        return null;
    }
}